package com.tongjie.hotelbooking.order.repository;

import com.tongjie.hotelbooking.order.entity.Order;
import com.tongjie.hotelbooking.order.entity.OrderConsulting;
import com.tongjie.hotelbooking.user.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface OrderConsultingRepository extends JpaRepository<OrderConsulting, Long>, JpaSpecificationExecutor<OrderConsulting> {

    Integer countOrderConsultingByOrder(Order order);

    OrderConsulting getOrderConsultingByOrderAndMerchant(Order order, User merchant);

}
